use std::sync::Arc;
use std::thread;
fn main() {
    //
    let data = Arc::new(46);
    // data
    let thread1 = {
        let data = Arc::clone(&data);
        thread::spawn(move || {
            // data
            println!("Thread 1: {}", data);
        })
    };
    let thread2 = {
        let data = Arc::clone(&data);
        thread::spawn(move || {
            // data
            println!("Thread 2: {}", data);
        })
    };
    //
    thread1.join().unwrap();
    thread2.join().unwrap();
}
